CREATE TABLE [dbo].[AFI]
(
[AFICode] [nvarchar] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ClientName] [nvarchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ClientAddress1] [nvarchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ClientAddress2] [nvarchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ClientAddress3] [nvarchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ClientTaxCode] [nvarchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CreatedBy] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CreatedDate] [datetime] NOT NULL CONSTRAINT [DF_AFI_CreatedDate] DEFAULT (getdate()),
[Currency] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Status] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PAM] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AFI] ADD CONSTRAINT [PK_AFI] PRIMARY KEY CLUSTERED  ([AFICode]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AFI] ADD CONSTRAINT [FK_AFI_WebUser] FOREIGN KEY ([CreatedBy]) REFERENCES [dbo].[WebUser] ([UserId])
GO
